<script type="text/javascript">
    $(function(){
        $('#edit_user_upload').uploadify({
                    'swf'      : '__PUBLIC__/js/uploadify/uploadify.swf',
                    'uploader' : '{:U('Pay/public_uploadHead?id='.$info["id"])}',
                'buttonText': '选择图片',
                'width'	: 70,
                'height': 28,
                'buttonClass': 'upload_button',
                'auto'	: true,
                'removeTimeout' : 0,//文件队列上传完成1秒后删除
                'fileTypeDesc' : 'Image Files',//只允许上传图像
                'fileTypeExts' : '*.gif; *.jpg; *.png',//限制允许上传的图片后缀
                'onUploadSuccess' : function(file, data, response){
            var data = $.parseJSON(data);
            if(!data.status){
                $.messager.alert('提示信息', data.info, 'error');
            }else{
                $('#edit_user_image').attr('src',data.url);
                $('#edit_user_head').attr('value',data.url);
            }
        }
    });
    })
    $.formValidator.initConfig({formID:"payEditForm",theme:'App',onError:function(msg){},onSuccess:user_SaveEdit,inIframe:true});

    function user_SaveEdit(){
        $.post('{:U('Pay/edit?id='.$info['id'])}', $("#payEditForm").serialize(), function(data){
            if(!data.status){
                $.messager.alert('提示信息', data.info, 'error');
            }else{
                payRefreshList();
                $.messager.alert('提示信息', data.info, 'info');
                $('#payEditBox').dialog('close');
            }
        })
    }
</script>
<form id="payEditForm" style="font-size:13px; padding: 5px 0 0 10px;">
    <table cellspacing="5">
        <tr>
            <td>支付账号：</td>
            <td colspan="2" align="center">
                <input type="text" name="info[account]" value="{$info.account}">
            </td>
        </tr>
        <tr>
            <td>持卡人(开户行)：</td>
            <td colspan="2" align="center">
                <input type="text" name="info[person]" value="{$info.person}">
            </td>
        </tr>
        <tr>
            <td>支付图片：</td>
            <td colspan="2" align="center">
                <div style="float: left; width:auto;">
                    <div style="float: left; width:auto; padding: 2px;">
                        <img id="edit_user_image" src="{$info.headsmall}" height="80px;" style="min-width: 80px;padding: 3px; border: 1px solid #ccc;">
                    </div>
                </div>
                <div style="margin-left: 5px; float: left; width:240px; height:80px; padding:5px;">
                    <div style="width: 100%; height: 30px;"></div>
                    <input id="edit_user_upload" name="edit_user_upload" type="file">
                </div>
                <input id="edit_user_head" name="info[headsmall]" value="{$info.headsmall}" type="hidden">
            </td>
        </tr>
    </table>
</form>